<?php
/**
 * +--------------------------------------------------------+
 * @Created by PhpStorm.
 * @Category Store.php
 * @Depiction:
 * Author: hwy
 * Date: 2020/9/30  16:46
 * +--------------------------------------------------------+
 */

namespace App\Http\Requests\Article;


use App\Http\Requests\BaseRequestsPost;

class Store extends BaseRequestsPost
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'     => 'required',
            'describe' => 'required',
            'content_md'  => 'required',
        ];
    }

    /**
     * 定义字段名中文
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'name'     => '名称',
            'describe' => '描述',
            'content_md'  => '内容',
        ];
    }

    public function messages()
    {
        return [
            'name.required'     => '名称不能为空',
            'describe.required' => '描述不能为空',
            'content_md.required'  => '内容不能为空'
        ];
    }
}
